<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('ad_postback_config', function (Blueprint $table) {
            $table->integer('regpay_status')->comment('注册付费人数控制状态')->unsigned()->default(0);
            $table->double('regpay_per', 16, 4)->comment('控制人数百分比')->unsigned()->default(100);
            $table->integer('regpay_type')->comment('控制人数粒度')->unsigned()->default(0);
        });

        Schema::connection('mysql_log')->table('log_ad_postback', function (Blueprint $table) {
            $table->integer('user_id')->comment('账号id')->unsigned()->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
};
